<script>
    // 成员模态表单页
    Vue.component('day-dialog', {
        template: `
<el-dialog
  title="提示"
  :visible.sync="dialogShow"
  width="30%"
  @close="closeModal">
  <span>该账本试用期将于{{day <0? 0:day}}天后结束，试用期结束后将无法记账。</span>
  <span slot="footer" class="dialog-footer">
    <el-button @click="closeModal">知道了</el-button>
    <el-button type="primary" @click="handleMemberForm">去开通</el-button>
  </span>
</el-dialog>`,
        props: ['dialog-show'],
        computed: {
            currentTallyId() {
                return this.$store.state.currentTallyId
            },
            currentTally () {
                return this.$store.state.currentTally
            },
            userData () {
                return this.$store.state.userData
            },
            day(){
                return  this.$store.state.day
            }
        },
        watch: {
            dialogShow:{
                handler (newVal) {},
                deep:true,
                immediate: true
            },

        },

        methods: {
            closeModal() {
                this.$store.state.dayDialog = false;
            },
            handleMemberForm() {
                this.$store.state.buyTallyShow = true;
            }
        }
    })
</script>

